package cn.rbac.model;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name="sys_node")
public class Resource {
	
	
	private int ids;
	private String name;
	private String url;
	private int orders;
	private int level;
	private int parentIds;
	private int status;
	private String description;
	
	private List<Resource> child=new ArrayList<Resource>();
	
	
	@Id
	public int getIds() {
		return ids;
	}

	public void setIds(int ids) {
		this.ids = ids;
	}
	
	public void setParentIds(int parentIds) {
		this.parentIds = parentIds;
	}

	
	public int getParentIds() {
		return parentIds;
	}

	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getOrders() {
		return orders;
	}
	public void setOrders(int orders) {
		this.orders = orders;
	}
	public int getLevel() {
		return level;
	}
	public void setLevel(int level) {
		this.level = level;
	}
	
	
	public int getStatus() {
		return status;
	}
	public void setStatus(int status) {
		this.status = status;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	
	@OneToMany(mappedBy="parentIds")
	public List<Resource> getChild() {
		return child;
	}
	public void setChild(List<Resource> child) {
		this.child = child;
	}
	
	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

}
